﻿#include "stdafx.h"
#include "./luafunction.h"

FuncPointerMgr::FuncPointerMgr()
{
}

FuncPointerMgr::~FuncPointerMgr()
{
    PointerListIterator iter;
    for (iter = m_ptList.begin(); iter != m_ptList.end(); iter++)
    {
        free(*iter);
    }
}

void* FuncPointerMgr::NewPointer(void* pt, int len)
{
    void* newpt = malloc(len);
    memcpy(newpt, pt, len);
    m_ptList.push_back(newpt);

    return newpt;
}